﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using App;
using Domin;
using Microsoft.AspNetCore.Hosting;
using System.IO;
using Microsoft.EntityFrameworkCore;
using JwT;
using Microsoft.AspNetCore.Authorization;

namespace UL.Controllers
{
    /// <summary>
    /// 权限管理
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class ThisPowerController : ControllerBase
    {
        private readonly IRApp db;

        /// <summary>
        /// 依赖注入
        /// </summary>
        /// <param name="db"></param>
        public ThisPowerController(IRApp db)
        {
            this.db = db;
        }
        /// <summary>
        /// 权限树形显示
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult WShow()
        {
            return Ok(new { data = db.WShow().ToList() });
        }
    }
}
